package simpleeditor.controllers;

import simpleeditor.Ui_SimpleEditor;
import simpleeditor.model.InteractionManager;

import com.trolltech.qt.gui.QTableWidgetItem;

public class InteractionController extends TableEditController {

	int groupCount=0;
//	private InteractionManager im;
	
	public InteractionController(Ui_SimpleEditor ui){
		super(ui.interactionsTableWidget,ui.addInteractionButton,ui.removeInteractionButton);
	}
	
	public InteractionController(Ui_SimpleEditor ui,
			InteractionManager im) {
		this(ui);
//		this.im=im;
	}

	@Override
	public void addRow() {
		table.setRowCount(table.rowCount()+1);
		table.setItem(table.rowCount()-1, 0, new QTableWidgetItem("Group_"+(++groupCount%Integer.MAX_VALUE)));
		table.setItem(table.rowCount()-1, 1, new QTableWidgetItem("0"));
		table.setItem(table.rowCount()-1, 2, new QTableWidgetItem(""));
	}

	@Override
	protected void removeFromModel(String item) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void editItem() {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected boolean updateModel(int row, int column, int oldValue, int newValue) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	protected boolean updateModel(int row, int column, String oldValue, String newValue) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	protected boolean updateModel(int row, int editedColumn2, int currentIndex,
			String text, String currentText) {
		// TODO Auto-generated method stub
		return false;
	}

}
